cmake_minimum_required(VERSION 3.10)

find_package(Boost COMPONENTS program_options system date_time)

include_directories($ENV{DM2016_DEV}/tinyxml/inc ${Boost_INCLUDE_DIRS})
include_directories($ENV{DM2016_DEV})
include_directories(inc)

link_directories(${LIBRARY_OUTPUT_PATH})

aux_source_directory(src SRC)

add_executable(slaver104 ${SRC})

DB_SELECT(slaver104)

if( Boost_FOUND )
	target_link_libraries(slaver104 osprotocol protocol oscom osascom scada dmsys oslog osmsg options osdb dmos string misc env tinyxml json ${Boost_LIBRARIES})
else()
	target_link_libraries(slaver104 osprotocol protocol oscom osascom scada dmsys oslog osmsg options osdb dmos string misc env tinyxml json boost_program_options boost_system)
endif()

if( NOT WIN32 )
	target_link_libraries(slaver104 osio rt pthread)
endif()